widget: make sure to check all children for allocation needs
authorCosimo Cecchi <cosimoc@gnome.org>
Sun, 28 Feb 2016 18:58:06 +0000 (10:58 -0800)
committerCosimo Cecchi <cosimoc@gnome.org>
Sun, 28 Feb 2016 20:30:16 +0000 (12:30 -0800)
GtkWidget uses gtk_container_foreach() to iterate over children and
check whether they need their allocation reset.
However, that leaves out internal children, such as scrollbars of a
GtkScrolledWindow. Use gtk_container_forall() instead.

gtk/gtkwidget.c

index b77c1539ca70ec38b9bd4426bd99b751c53dd838..5c7b8598a64b003aa3450bf133d01e2664660221 100644 (file)
@@ -16256,9 +16256,9 @@ gtk_widget_ensure_allocate (GtkWidget *widget)
       priv->alloc_needed_on_child = FALSE;
 
       if (GTK_IS_CONTAINER (widget))
-        gtk_container_foreach (GTK_CONTAINER (widget),
-                               (GtkCallback) gtk_widget_ensure_allocate,
-                               NULL);
+        gtk_container_forall (GTK_CONTAINER (widget),
+                              (GtkCallback) gtk_widget_ensure_allocate,
+                              NULL);
     }
 }